-
Notifications
You must be signed in to change notification settings - Fork 25
Add mldsa-native.h API header file #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakemas IIRC the plan was to have the monobuild files in the monobuild example folder first, and eventually restructure everything to follow the directory pattern as in mlkem-native (with mldsa/src/* for the bulk of the source, and mldsa/mldsa_native.* for the toplevel). I don't think we want mldsa_native.c in the toplevel directory.
Why is mldsa_native.c needed for this change at all, actually?
|
@jakemas - this is blocking the alpha release. Are you planning to finish this soon, or do you want me to take over? |
20b9f11 to
0b74d9a
Compare
I took the liberty to finish this up. |
0b74d9a to
c9ef837
Compare
35e4daa to
b102e39
Compare
b102e39 to
a6a4882
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments on the use of the enum and consistency of array vs. pointer declarations. Both can be follow-ups. Thanks @mkannwischer!
Co-authored-by: Matthias J. Kannwischer <[email protected]> Signed-off-by: Jake Massimo <[email protected]> Signed-off-by: Matthias J. Kannwischer <[email protected]>
a6a4882 to
070d7bd
Compare
Currently we have an enum for the 12 different pre-hash functions for HashML-DSA. This leads to problems in multi-level builds as we must only define the enum once. Currently we work around this by guarding the enum definition with a pre-processor conditional. However, there is also a (theoretical) concern about the type of the enum being implementation-defined in C90: #537 (comment) It seems cleaner to not use an enum here, but instead use #defines avoiding all the above problems. This commit implements that change. We also eliminate the camel case hashAlg - that was inconsistent with the remaining code base from the start. Resolves #591 Signed-off-by: Matthias J. Kannwischer <[email protected]>
Currently we have an enum for the 12 different pre-hash functions for HashML-DSA. This leads to problems in multi-level builds as we must only define the enum once. Currently we work around this by guarding the enum definition with a pre-processor conditional. However, there is also a (theoretical) concern about the type of the enum being implementation-defined in C90: #537 (comment) It seems cleaner to not use an enum here, but instead use #defines avoiding all the above problems. This commit implements that change. We also eliminate the camel case hashAlg - that was inconsistent with the remaining code base from the start. Resolves #591 Signed-off-by: Matthias J. Kannwischer <[email protected]>
Currently we have an enum for the 12 different pre-hash functions for HashML-DSA. This leads to problems in multi-level builds as we must only define the enum once. Currently we work around this by guarding the enum definition with a pre-processor conditional. However, there is also a (theoretical) concern about the type of the enum being implementation-defined in C90: #537 (comment) It seems cleaner to not use an enum here, but instead use #defines avoiding all the above problems. This commit implements that change. We also eliminate the camel case hashAlg - that was inconsistent with the remaining code base from the start. Resolves #591 Signed-off-by: Matthias J. Kannwischer <[email protected]>
Currently we have an enum for the 12 different pre-hash functions for HashML-DSA. This leads to problems in multi-level builds as we must only define the enum once. Currently we work around this by guarding the enum definition with a pre-processor conditional. However, there is also a (theoretical) concern about the type of the enum being implementation-defined in C90: #537 (comment) It seems cleaner to not use an enum here, but instead use #defines avoiding all the above problems. This commit implements that change. We also eliminate the camel case hashAlg - that was inconsistent with the remaining code base from the start. Resolves #591 Signed-off-by: Matthias J. Kannwischer <[email protected]>
Currently we have an enum for the 12 different pre-hash functions for HashML-DSA. This leads to problems in multi-level builds as we must only define the enum once. Currently we work around this by guarding the enum definition with a pre-processor conditional. However, there is also a (theoretical) concern about the type of the enum being implementation-defined in C90: #537 (comment) It seems cleaner to not use an enum here, but instead use #defines avoiding all the above problems. This commit implements that change. We also eliminate the camel case hashAlg - that was inconsistent with the remaining code base from the start. Resolves #591 Signed-off-by: Matthias J. Kannwischer <[email protected]>
This PR adds mldsa_native.h which is a prerequisite for the monobuilds.